package com.usst.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.usst.entity.Post;
import com.usst.repository.PostRepository;
import com.usst.service.PostService;

@Service
public class PostServiceImpl implements PostService{
	
	@Autowired
	private PostRepository postRepo;

	@Override
	public Post save(Post post) {
		return postRepo.save(post);
	}

	@Override
	public Post update(Post post){
		return postRepo.save(post);
	}

	@Override
	public void delete(Post post) {
		postRepo.delete(post);
	}

	@Override
	public Post findOne(Long postId) {
		return postRepo.findOne(postId);
	}

}
